﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class PlayerUI : MonoBehaviour {

    public RectTransform arrow;
    public Image HpProgress;
    public Text nameText;

    //设置箭头的长度
	public void SetArrow(float force)
    {
        arrow.sizeDelta = new Vector2(256, force * 30);
    }

    //设置血量进度
    public void SetHp(float value)
    {
        HpProgress.fillAmount = value;
    }

    //设置玩家名字
    public void SetName(string name)
    {
        nameText.text = name;
    }
}
